#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include<QComboBox>
#include <QCloseEvent>

#include "LineGraphWidget.h"
#include "mythread.h"



namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void text_display(u_char * a,int lentmp);
    void text2_display(u_char * a,int lentmp);
    void arp_display();
    void icmp_display();
    void tcp_display();
    void udp_display();
     MyThread  thr;
     MyThread1  thr1;
     LineGraphWidget *linechart;
     QComboBox *qcb;
     QComboBox *qcb1;
     QDialog *selectDlg;

private slots:
    void on_pushButton_clicked();
    void display();
    void cellSelected(int nrow,int ncol);
    void on_pushButton_2_clicked();
    void set();
    void dialogclose();
    void on_pushButton_3_clicked();

    void on_pushButton_4_clicked();

    void on_pushButton_5_clicked();

private:
    Ui::MainWindow *ui;
    void closeEvent(QCloseEvent *event);
    void refresh();
    int button4times=0;
    int settimes=0;
};


#endif // MAINWINDOW_H
